from django_filters.rest_framework import FilterSet
from .models import SaltMaster
from .models import Host
from .models import SaltAuth
class SaltMasterFilter(FilterSet):
    '''
    SaltMaster 过滤器
    '''
    class Meta:
        model = SaltMaster
        fields = ['saltm_name']


class HostFilter(FilterSet):
    '''
    主机 过滤器
    '''
    class Meta:
        model = Host
        fields = ['name']


class SaltFilter(FilterSet):
    '''
    主机 过滤器
    '''
    class Meta:
        model = SaltAuth
        fields = ['saltname']